<?php


namespace app\api\controller;



use logicmodel\TaskLogic;
use logicmodel\WalletLogic;

class Task
{

    private $taskLogic;
    public function __construct()
    {
        $this->taskLogic = new TaskLogic();
    }


    /**
     * 更新验证码
     * @return \think\response\Json
     * @throws \think\Exception
     * @throws \think\exception\PDOException
     */
    public function setCode(){
        return json($this->taskLogic->setCode());
    }

    /**
     * 取消盲盒订单
     * @return \think\response\Json
     * @throws \think\Exception
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function cancelOrderBox(){
        return json($this->taskLogic->cancelOrderBox());
    }

    /**
     * 取消NFT订单
     * @return \think\response\Json
     * @throws \think\Exception
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function cancelOrderGoods(){
        return json($this->taskLogic->cancelOrderGoods());
    }

    /**
     * 取消市场未付款的NFT订单
     * @return \think\response\Json
     */
    public function cancelGoodsOrder(){
        return json($this->taskLogic->cancelGoodsOrder());
    }

    /**
     * 取消市场未付款的盲盒订单
     * @return \think\response\Json
     */
    public function cancelBoxOrder(){
        return json($this->taskLogic->cancelBoxOrder());
    }
}